require "migration_helpers"
class CreateCitations < ActiveRecord::Migration
  extend MigrationHelpers
  def self.up
    create_table :citations do |t|
      t.column :title, :string
      t.column :author, :string
      t.column :citation_type_id, :integer
      t.column :source, :string
      t.column :meta_id, :integer
    end
    foreign_key(:citations, :citation_type_id, :citation_types)
    foreign_key(:citations, :meta_id, :metas)
  end

  def self.down
    drop_table :citations
  end
end
